import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router';
import Buttonview from '../views/Buttonview.vue'

const routes = [
    {
        path: '/',
        redirect: 'button',
        component: Buttonview
    },
    {
        path: '/button',
        name: 'Button',
        component: Buttonview
    }
]

const router = createRouter({
    // history模式
    // history: createWebHistory(),
    // hash模式：#/
    history: createWebHashHistory(),
    routes,
})

export default router;